package com.moyu.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 响应状态枚举类
 *
 * @Author 赵彦博
 * @Date 2025/3/25 19:51
 */
@AllArgsConstructor
@Getter
public enum ResultCode {

    /** 定义状态码 */

    //操作成功
    SUCCESS                                 (1000, "操作成功"),

    //服务器内部错误，友好提示
    ERROR                                   (2000, "服务繁忙请稍后重试"),

    //操作失败，但是服务器不存在异常
    FAILED                                  (3000, "操作失败"),
    FAILED_UNAUTHORIZED                     (3001, "未授权"),
    FAILED_PARAMS_VALIDATE                  (3002, "参数校验失败"),
    FAILED_NOT_EXISTS                       (3003, "资源不存在"),
    FAILED_ALREADY_EXISTS                   (3004, "资源已存在"),

    AILED_USER_EXISTS                       (3101, "用户已存在"),
    FAILED_USER_NOT_EXISTS                  (3102, "用户不存在"),
    FAILED_LOGIN                            (3103, "账号或密码错误"),
    FAILED_PASSWORD                         (3104, "密码错误"),
    FAILED_PASSWORD_TWO                     (3105, "两次书写不一致"),

    FAILED_ROLE_NOT_EXISTS                  (4001, "角色不存在"),
    AILED_ROLE_EXISTS                       (4002, "角色已存在"),
    FAILED_PERMISSION_NOT_EXISTS            (5001, "权限不存在"),
    AILED_PERMISSION_EXISTS                 (5002, "权限已存在"),
    FAILED_DELETE_BOARD                     (7002, "该标签下有帖子不能删除"),
    FAILED_FIND_POST                        (8002,"未找到举报记录对应的帖子"),
    FAILED_UPDATE_POST                        (8003,"更新帖子状态失败");

    private int code;

    private String msg;
}
